/*
 * @Description  : 版本更新结果类
 * @Date         : 2021-06-02 14:25:31
 * @Author       : 保锋
 * @LastEditTime : 2021-06-02 14:27:04
 * @LastEditors  : 保锋
 * @FilePath     : \caiying_flutter\lib\model\version_result_model.dart
 */
class VersionResultModel {
  late int code;
  late String message;
  late Content content;

  VersionResultModel(
      {required this.code, required this.message, required this.content});

  VersionResultModel.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    message = json['message'];
    content = (json['content'] != null
        ? new Content.fromJson(json['content'])
        : null)!;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['code'] = this.code;
    data['message'] = this.message;
    if (this.content != null) {
      data['content'] = this.content.toJson();
    }
    return data;
  }
}

class Content {
  late int total;
  late int page;
  late int perPage;
  late VersionModel data;

  Content(
      {required this.total,
      required this.page,
      required this.perPage,
      required this.data});

  Content.fromJson(Map<String, dynamic> json) {
    total = json['total'];
    page = json['page'];
    perPage = json['per_page'];
    data = (json['data'] != null
        ? new VersionModel.fromJson(json['data'])
        : null)!;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['total'] = this.total;
    data['page'] = this.page;
    data['per_page'] = this.perPage;
    if (this.data != null) {
      data['data'] = this.data.toJson();
    }
    return data;
  }
}

class VersionModel {
  late String androidVersion;
  late List<String> androidMsg;
  late String androidUrl;

  VersionModel(
      {required this.androidVersion,
      required this.androidMsg,
      required this.androidUrl});

  VersionModel.fromJson(Map<String, dynamic> json) {
    androidVersion = json['android_version'];
    androidMsg = json['android_msg'].cast<String>();
    androidUrl = json['android_url'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['android_version'] = this.androidVersion;
    data['android_msg'] = this.androidMsg;
    data['android_url'] = this.androidUrl;
    return data;
  }
}
